﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using S4Store.Domain.CarKpi;
using S4Store.Domain.SellerKpi;

namespace S4Store.Models.CarKpi
{
    public class CarModelListModel
    {
        public CarModelListModel()
        {
            CarBrands = new List<Domain.CarBrand>();
            CarModelMonthConfigs = new List<CarModelMonthConfig>();
        }

        public List<S4Store.Domain.CarBrand> CarBrands { get; set; }
        public List<CarModelMonthConfig> CarModelMonthConfigs { get; set; }

        public CarModelMonthConfig GetCarModelMonthConfig(int carmodelid)
        {
            var result= CarModelMonthConfigs.FirstOrDefault(t => t.CarModelId == carmodelid);
            if (result == null)
            {
                result = new CarModelMonthConfig();
            }
            else
            {
                result.Enble = true;
            }
            return result;
        }
    }
}